package com.summer.service.impl;

import com.summer.entity.UserBankCardInfo;
import com.summer.mapper.UserBankCardInfoMapper;
import com.summer.service.IUserBankCardInfoService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 用户银行卡信息的Service接口实现类
 */
@Service
@Transactional
public class UserBankCardInfoServiceImpl implements IUserBankCardInfoService {

    @Resource
    private UserBankCardInfoMapper userBankCardInfoMapper;

    @Override
    public List<UserBankCardInfo> findByParams(Map<String, Object> map) {
        return userBankCardInfoMapper.findByParams(map);
    }


    @Override
    public Integer addUserCardInfo(UserBankCardInfo userBankCardInfo) {
        userBankCardInfoMapper.addUserCardInfo(userBankCardInfo);
        return userBankCardInfo.getId();
    }

    @Override
    public int deleteById(Integer id) {
        return userBankCardInfoMapper.deleteById(id);
    }

    @Override
    public int updateById(UserBankCardInfo userBankCardInfo) {
        return userBankCardInfoMapper.updateById(userBankCardInfo);
    }
}
